﻿@model Clirelmgt.Models.ListModel

@{
    ViewBag.Title = "List";
}

<div class="dashboard-wrapper">
    <div class="left-sidebar">
        <div class="row-fluid">
            <div class="span12">
                <div class="widget">
                    <div class="widget-body">
                        <ul class="nav nav-tabs no-margin myTabBeauty">
                            <li class="active">
                                <a data-toggle="tab" href="#tabActions">Actions
                                </a>
                            </li>
                            <li>
                                <a data-toggle="tab" href="#tabReports">Reports
                                </a>
                            </li>

                        </ul>
                        <div class="tab-content" id="myTabContent">
                            <div id="tabActions" class="tab-pane fade active in">
                                 <a href="/Page/Card/@Model.CardName" type="button" class="btn btn-success">
                                  <i class=" icon-white icon-plus">
                                  </i>
                                  Add
                                </a>
                                <button type="button" class="btn btn-warning">
                                  <i class=" icon-white icon-cancel-circle">
                                  </i>
                                  Delete
                                </button>
                                <button type="button" class="btn btn-info">
                                  <i class=" icon-white icon-refresh">
                                  </i>
                                  Refresh
                                </button>
                            </div>
                            <div id="tabReports" class="tab-pane fade">
                                @if (Model.Menus != null)
                                {
                                    List<Clirelmgt.Models.MetaMenu> reportMenus = Model.Menus.Where(obj => (obj.TabName == "Reports")).ToList();
                                    foreach (var menu in reportMenus)
                                    {
                                        <a href="/Report/Card/LeadBySource" type="button" class="btn btn-warning2">
                                          <i class=" icon-white icon-chart">
                                          </i>
                                          @menu.Name
                                        </a>
                                    }
                                }
                            </div>

                        </div>
                    </div>
                    <div class="widget-header">
                        <div class="title">
                            @Model.Title
                        </div>
                        <span class="tools">
                            <a class="fs1" aria-hidden="true" data-icon="&#xe090;"></a>
                        </span>
                    </div>
                    <div class="widget-body">
                        <table class="table table-condensed table-striped table-bordered table-hover no-margin">
                            <thead>
                                <tr>
                                    <th>
                                        <input type="checkbox" class="no-margin" />
                                    </th>
                                    @if(Model.DisplayFields!=null)
                                    {
                                        foreach (KeyValuePair<string, string> headerInfo in Model.DisplayFields)
                                        {
                                            <th>@headerInfo.Value</th>
                                        }
                                    }
                                    <th style="width:60px;"></th>
                                </tr>
                            </thead>
                            <tbody>
                                @if (Model.RecordTable != null)
                                {
                                    foreach (System.Data.DataRow dataRow in Model.RecordTable.Rows)
                                    {
                                    <tr>
                                        <td style="width: 30px">
                                            <input type="checkbox" class="no-margin" />
                                        </td>
                                        @foreach (KeyValuePair<string, string> field in Model.DisplayFields)
                                        {
                                            <td>
                                                @dataRow[field.Key].ToString()
                                            </td>
                                        }

                                        <td class="hidden-phone">

                                            <div class="btn-group">
                                                <button data-toggle="dropdown" class="btn btn-mini dropdown-toggle">
                                                    Action 
                               
                                                <span class="caret"></span>
                                                </button>
                                                <ul class="dropdown-menu">
                                                    <li>
                                                        <a href="/Page/Card/@Model.CardName?mode=edit&key=@dataRow["No"].ToString()">Edit
                                                        </a>
                                                    </li>
                                                    <li>
                                                        <a href="#">Delete
                                                        </a>
                                                    </li>
                                                </ul>
                                            </div>
                                        </td>
                                    </tr>
                                    }
                                }
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>

        </div>
    </div>

    <div class="right-sidebar">


        <div class="wrapper">
            <table class="table table-condensed table-striped table-bordered table-hover no-margin">
                <thead>
                    <tr>
                        <th style="width: 10%">
                            <input type="checkbox" class="no-margin" />
                        </th>
                        <th style="width: 70%">Name
                        </th>
                        <th style="width: 20%">Status
                        </th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>
                            <input type="checkbox" class="no-margin" />
                        </td>
                        <td>
                            <span class="name">Mahendra Singh Dhoni
                            </span>
                        </td>
                        <td>
                            <span class="label label label-info">New
                            </span>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <input type="checkbox" class="no-margin" />
                        </td>
                        <td>
                            <span class="name">Michel Clark
                            </span>
                        </td>
                        <td>
                            <span class="label label label-success">New
                            </span>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <input type="checkbox" class="no-margin" />
                        </td>
                        <td>
                            <span class="name">Rahul Dravid
                            </span>
                        </td>
                        <td>
                            <span class="label label label-important">New
                            </span>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <input type="checkbox" class="no-margin" />
                        </td>
                        <td>
                            <span class="name">Anthony Michell
                            </span>
                        </td>
                        <td>
                            <span class="label label label-info">New
                            </span>
                        </td>

                    </tr>
                    <tr>
                        <td>
                            <input type="checkbox" class="no-margin" />
                        </td>
                        <td>
                            <span class="name">Srinu Baswa
                            </span>
                        </td>
                        <td>
                            <span class="label label label-success">New
                            </span>
                        </td>

                    </tr>
                </tbody>
            </table>
        </div>

        <hr class="hr-stylish-1">

        <div class="wrapper">
            <div class="btn-toolbar no-margin">
                <div class="btn-group">
                    <a href="#" class="btn btn-success">
                        <i class="icon-white icon-headphones"></i>
                    </a>
                    <a href="#" class="btn btn-warning">
                        <i class="icon-white icon-thumbs-down"></i>
                    </a>
                    <a href="#" class="btn btn-warning2">
                        <i class="icon-white icon-signal"></i>
                    </a>
                    <a href="#" class="btn btn-info">
                        <i class="icon-white icon-share-alt"></i>
                    </a>
                </div>
                <div class="btn-group">
                    <a href="#" class="btn btn-inverse">
                        <i class="icon-white icon-trash"></i>
                    </a>
                </div>
            </div>
        </div>

    </div>
</div>
